﻿using System;
using HslCommunication.Reflection;
using HslCommunication.Serial;

namespace HslCommunication.Profinet.Keyence
{
	/// <inheritdoc cref="T:HslCommunication.Profinet.Keyence.KeyenceSR2000SeriesTcp" />
	// Token: 0x02000091 RID: 145
	public class KeyenceSR2000Serial : SerialBase, IKeyenceSR2000Series
	{
		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000SeriesTcp.#ctor" />
		// Token: 0x06000B06 RID: 2822 RVA: 0x000422B7 File Offset: 0x000404B7
		public KeyenceSR2000Serial()
		{
			base.ReceiveTimeout = 10000;
			base.SleepTime = 20;
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.ReadBarcode(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B07 RID: 2823 RVA: 0x000422D6 File Offset: 0x000404D6
		[HslMqttApi]
		public OperateResult<string> ReadBarcode()
		{
			return KeyenceSR2000Helper.ReadBarcode(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.Reset(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B08 RID: 2824 RVA: 0x000422E9 File Offset: 0x000404E9
		[HslMqttApi]
		public OperateResult Reset()
		{
			return KeyenceSR2000Helper.Reset(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.OpenIndicator(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B09 RID: 2825 RVA: 0x000422FC File Offset: 0x000404FC
		[HslMqttApi]
		public OperateResult OpenIndicator()
		{
			return KeyenceSR2000Helper.OpenIndicator(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.CloseIndicator(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B0A RID: 2826 RVA: 0x0004230F File Offset: 0x0004050F
		[HslMqttApi]
		public OperateResult CloseIndicator()
		{
			return KeyenceSR2000Helper.CloseIndicator(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.ReadVersion(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B0B RID: 2827 RVA: 0x00042322 File Offset: 0x00040522
		[HslMqttApi]
		public OperateResult<string> ReadVersion()
		{
			return KeyenceSR2000Helper.ReadVersion(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.ReadCommandState(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B0C RID: 2828 RVA: 0x00042335 File Offset: 0x00040535
		[HslMqttApi]
		public OperateResult<string> ReadCommandState()
		{
			return KeyenceSR2000Helper.ReadCommandState(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.ReadErrorState(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B0D RID: 2829 RVA: 0x00042348 File Offset: 0x00040548
		[HslMqttApi]
		public OperateResult<string> ReadErrorState()
		{
			return KeyenceSR2000Helper.ReadErrorState(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.CheckInput(System.Int32,System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B0E RID: 2830 RVA: 0x0004235B File Offset: 0x0004055B
		[HslMqttApi]
		public OperateResult<bool> CheckInput(int number)
		{
			return KeyenceSR2000Helper.CheckInput(number, new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.SetOutput(System.Int32,System.Boolean,System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B0F RID: 2831 RVA: 0x0004236F File Offset: 0x0004056F
		[HslMqttApi]
		public OperateResult SetOutput(int number, bool value)
		{
			return KeyenceSR2000Helper.SetOutput(number, value, new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.ReadRecord(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B10 RID: 2832 RVA: 0x00042384 File Offset: 0x00040584
		[HslMqttApi]
		public OperateResult<int[]> ReadRecord()
		{
			return KeyenceSR2000Helper.ReadRecord(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.Lock(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B11 RID: 2833 RVA: 0x00042397 File Offset: 0x00040597
		[HslMqttApi]
		public OperateResult Lock()
		{
			return KeyenceSR2000Helper.Lock(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.UnLock(System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B12 RID: 2834 RVA: 0x000423AA File Offset: 0x000405AA
		[HslMqttApi]
		public OperateResult UnLock()
		{
			return KeyenceSR2000Helper.UnLock(new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc cref="M:HslCommunication.Profinet.Keyence.KeyenceSR2000Helper.ReadCustomer(System.String,System.Func{System.Byte[],HslCommunication.OperateResult{System.Byte[]}})" />
		// Token: 0x06000B13 RID: 2835 RVA: 0x000423BD File Offset: 0x000405BD
		[HslMqttApi]
		public OperateResult<string> ReadCustomer(string command)
		{
			return KeyenceSR2000Helper.ReadCustomer(command, new Func<byte[], OperateResult<byte[]>>(base.ReadBase));
		}

		/// <inheritdoc />
		// Token: 0x06000B14 RID: 2836 RVA: 0x000423D1 File Offset: 0x000405D1
		public override string ToString()
		{
			return string.Format("KeyenceSR2000Serial[{0}:{1}]", base.PortName, base.BaudRate);
		}
	}
}
